#include "Pyramid.h"
#include "E_Transform3.h"
#define PI 3.1415926
int mian() {
	HWND hwnd = initgraph(500, 500);
	setbkcolor(WHITE);
	cleardevice();
	setorigin(250, 250);
	setaspectratio(1, -1);
	setlinecolor(BLACK);
	setlinestyle(PS_SOLID, 2);

	Pyramid pyramid;
	pyramid.GetPoint();
	pyramid.GetFace();
	E_Transform3 Rotate;
	Rotate.SetMatrix(pyramid.GetVertexArrayName(), 5);
	for (; 1;) {
		BeginBatchDraw();
		pyramid.Draw();
		FlushBatchDraw();
		Sleep(100);
		EndBatchDraw();
		cleardevice();
		Rotate.E_RotateZ(PI / 180);
		Rotate.E_RotateY(PI / 180);
		Rotate.E_RotateX(PI / 180);

	}
	_getwch();
	closegraph();
	return 0;
}